script for the PV metadatasize fix