Fixed logic in processRules loop. Done??