Fix order of and checks.