diff --git a/exec/ircbots/admin/admin_commands.js b/exec/ircbots/admin/admin_commands.js
index 9662b1a19fe436607d96a47910dc16025931870e..c0f62b725b055e2a799d4eb9ba13d675345fc45c 100644
--- a/exec/ircbots/admin/admin_commands.js
+++ b/exec/ircbots/admin/admin_commands.js
@@ -418,15 +418,19 @@ Bot_Commands["FINGER"].command = function (target,onick,ouh,srv,lvl,cmd) {
 					return;
 				}
 			 } else {
-				srv.o(target, strip_ctrl(f_sock.readline()));
-				f_line_count++;
-				if ((f_line_count > 10) &&
-				    (lvl < 75) &&
-				    ((target[0] == "#") ||
-				     (target[0] == "&")) ) {
-					srv.o(target,"*** Connection Terminated "
-						+"(output squelched after 10 lines)");
-					return;
+				var line=f_sock.readline();
+
+				if(line != null) {
+					srv.o(target, strip_ctrl(line));
+					f_line_count++;
+					if ((f_line_count > 10) &&
+					    (lvl < 75) &&
+					    ((target[0] == "#") ||
+					     (target[0] == "&")) ) {
+						srv.o(target,"*** Connection Terminated "
+							+"(output squelched after 10 lines)");
+						return;
+					}
 				}
 			}
 			if (time() >= timeout) {