Fixed some issues regarding the rule structure