corrections

corrected errors in JS