diff --git a/yeeshell.c b/yeeshell.c
index 6f2e466..3e764db 100644
--- a/yeeshell.c
+++ b/yeeshell.c
@@ -404,20 +404,18 @@ int builtin_mytop()
 	if ((pid = fork()) < 0)
 	{
 		printf("fork error\n");
-		return;
+		return -1;
 	}
-	if (pid == 0)
+
+	getkinfo();
+	mytop_memory();
+	get_procs();
+	if (prev_proc == NULL)
 	{
-		getkinfo();
-		mytop_memory();
 		get_procs();
-		if (prev_proc == NULL)
-		{
-			get_procs();
-		}
-		print_procs(prev_proc, proc, cputimemode);
-		exit(0);
 	}
+	print_procs(prev_proc, proc, cputimemode);
+	exit(0);
 }
 
 void mytop_memory()