Fix '' error in JS