Fixed a bug with added rules.