Fixed  server crash bug