Fix JS syntax bug