Changes to try to make it work on Heroku