fix metadata extractor barfing on bad input