fixes to server.js and vars.js