Fixing some mongo connection issues