Swap some if/else statements so the positive case is always first