Correct previous boolean logic