diff --git a/src/sieve-bin/bin-common.c b/src/sieve-bin/bin-common.c
index 268da6d754e5ea5a801e6c5978332565a15d0085..3b61de1b90b39f71a0715c36f496df59b68c7d57 100644
--- a/src/sieve-bin/bin-common.c
+++ b/src/sieve-bin/bin-common.c
@@ -22,7 +22,8 @@ static void sig_die(int signo, void *context ATTR_UNUSED)
 	   which is too common at least while testing :) */
 	if (signo != SIGINT)
 		i_warning("Killed with signal %d", signo);
-	io_loop_stop(ioloop);
+	// io_loop_stop(ioloop); We are not running an ioloop
+	exit(1);
 }
 
 void bin_init(void) 
diff --git a/src/sieve-bin/sieve-exec.c b/src/sieve-bin/sieve-exec.c
index a4e8b910802b5e7ef03d3ebccfb0e9cf5b1fef8f..0682e4fbfc6cdc4cf1c9c1a43226ab7d0595d4ec 100644
--- a/src/sieve-bin/sieve-exec.c
+++ b/src/sieve-bin/sieve-exec.c
@@ -55,7 +55,7 @@ int main(int argc, char **argv)
  
 	if ( argc > 2 )
     {
-        if ( *(argv[2]) == '-' && *(argv[2]+1) == '\0' )
+        if ( strcmp(argv[2], "-") == 0 )
             mfd = 0;
         else {
             if ( (mfd = open(argv[2], O_RDONLY)) < 0 ) {
diff --git a/src/sieve-bin/sieve-test.c b/src/sieve-bin/sieve-test.c
index 1b35a543e9ffdfaa56ba7a724600eec9930fa671..7d8a00ca578ef4ea84a868ce492b82a2409e7859 100644
--- a/src/sieve-bin/sieve-test.c
+++ b/src/sieve-bin/sieve-test.c
@@ -36,7 +36,7 @@ int main(int argc, char **argv)
 	/* Open mail file */
 	if ( argc > 2 ) 
 	{
-		if ( *(argv[2]) == '-' && *(argv[2]+1) == '\0' ) 
+		if ( strcmp(argv[2], "-") == 0 )
 			mfd = 0;
 		else {
 			if ( (mfd = open(argv[2], O_RDONLY)) < 0 ) {