Minor JS syntax fixes