Fix Javascript for heroku v2