fixed setup if logic for global on windows