Fix error in JS