some fixes to the server