fixed a few small syntax issues in the js file