Fix crashing on heroku