bug fixes
mongodb connection