fixing heroku app crash bug