fix bug that kills the server