fix a few syntax errors in client.js