move clear_match to correct position