Fix crashing on server.