Fixed ifmatch and whenmatch