Fixes for MongoId generation