fixed logic in formula properties