fixing mongodb connections