fixup bad if statements