JS syntax fixes