Some corrections in JS were done