small fixes to server side