Fixed a bug where adding a new rule might reset the contents of unsaved rules