Fixing syntax issues in JS causing Travis to fail