Fix errors in JavaScript file
Fix merge conflicts