Fixed issues with heroku and postgresql