--- a/process.c
+++ b/process.c
@@ -76,8 +76,6 @@
 			else
 				break;
 		}
-		else if (pid == 0)
-			break;
 		--number_of_children;
 	}
 }
@@ -143,7 +141,7 @@
 
 	memset(buffer, 0, 64);
 
-	if(read(pidfile, buffer, 63))
+	if(read(pidfile, buffer, 63) > 0)
 	{
 		if( (pid = atol(buffer)) > 0)
 		{