Fix a regression in mongodb connector