Fixing mongo connection issues