Trying to fix mongodb connection bug