javascript fix for heroku