fix rule implementation