Fixed logic of rules