fix stopping the server