Added some missed code and activation flag to rules.