fix bug and suit the rule