Fixed os type detection