fixes connection issues to mongo.