Fixes to make it run in heroku