fix so works with mongodb addons on heroku
misc fixes
misc fixes