Fix bugs at the server