Fixes for stopping server.