Fixed crashing of server.