A strategy for improving the robustness of a winding simulator by S. de Haan