Change order of OS check