fix the bug in server end