Needed to override equals and hashcode to avoid reading the same rule twice