Fixed a database bug with heroku.