Fixing bug with JSHINT