Corrected error in JS