diff --git a/src/signal_handler.c b/src/signal_handler.c
index d2b5fefd79a948d1bce38ee3abbce38750c676dd..b188c11f6c6f0c55a2a3450fb111d7723310e27b 100644
--- a/src/signal_handler.c
+++ b/src/signal_handler.c
@@ -23,7 +23,7 @@
 #include "builtin_functions.h"
 #include <signal.h>
 
-RCSID("$Id: signal_handler.c,v 1.100 1999/01/08 07:08:12 hubbe Exp $");
+RCSID("$Id: signal_handler.c,v 1.101 1999/01/16 01:32:06 hubbe Exp $");
 
 #ifdef HAVE_PASSWD_H
 # include <passwd.h>
@@ -121,7 +121,8 @@ struct wait_data {
 };
 
 static volatile struct wait_data wait_buf[WAIT_BUFFER];
-static volatile int firstwait=0, lastwait=0;
+static volatile int firstwait=0;
+static volatile int lastwait=0;
 
 #endif /* ! NT */
 
@@ -587,7 +588,7 @@ static void f_pid_status_wait(INT32 args)
 	key.type=T_INT;
 	key.u.integer=pid;
 	s=low_mapping_lookup(pid_mapping, &key);
-	if(s && s->type == T_OBJECT || s->u.object == fp->current_object)
+	if(s && s->type == T_OBJECT && s->u.object == fp->current_object)
 	{
 	  errorcount++;
 	  if(errorcount==50)