Use same order of conditions as original code

Does not seem to make any difference, but better safe than sorry.