fixed ugly initialisation bug on Windows