More reliable fix for valid matches