Fix Javascript for heroku