fixes to server.js