Fix issue in JS