Fix match detection