some small improvements to server