bug fixes for heroku deployment