}
 
 proc start_server {options {code undefined}} {
-    # If we are runnign against an external server, we just push the
+    # If we are running against an external server, we just push the
     # host/port pair in the stack the first time
     if {$::external} {
         if {[llength $::servers] == 0} {
 
         while 1 {
             # check that the server actually started and is ready for connections
-            if {[exec cat $stdout | grep "ready to accept" | wc -l] > 0} {
+            if {[exec grep "ready to accept" | wc -l < $stdout] > 0} {
                 break
             }
             after 10