Gosha's fix for windows