Fixed protocol/metadata consistency checking and cleansing.