some configs to work with heroku
fix final bugs.