Fixed a bug in server