Fixes mongo connection error.