fix OS detection order