More bug fixes in server, thanks to Monisha