fix areConnected() for mongo repository