fixed mongo serialization