fixing WAIT - MATCH_FOUND bug