Update of  MongoDBConnector, fix bugs when creating new objects