fixed bug where neither condition is met