fixed bug with rule evaluation