diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index <HASH>..<HASH> 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -300,8 +300,8 @@ module ChefZero
     #
     def stop(wait = 5)
       if @running
-        @server.shutdown
-        @thread.join(wait)
+        @server.shutdown if @server
+        @thread.join(wait) if @thread
       end
     rescue Timeout::Error
       if @thread
Handle exceptional conditions where stops are being called all over