fixed a few bugs on heroku deploy