Fixed errors causing problems with Heroku.