Bug fixes galore in the server