fix cancel on windows