fix object types in MongoDB repository