Fixed bug when rule cannot be added