Minor fixes for mongodb connector