Fix a rare TypeError in the metadatabox