fixed ordering of rules firing