Fix flipped conditions.

Originally I flipped both the `if` and what it did. Should have only flipped one of them.

(This is not finished yet, just wanted to make sure this didn't get missed. Will have more later this week.)