update logic to make heroku happier