fix OS detection