Minor JS syntax errors