Fix database issues for heroku