fix error in JS