fixed bug with OR statements