some fixes to server