Fix bug wherein multiple rules matched are skipped once one matches