fixed a few js syntax errors