fix negated logic