Fixing conflicts in JS file