fixed bugs for heroku