fixing issues with connecting to mongo