fixed url construction when using heroku app