Fixed a server crash bug