fixed loops caused by junction fixes on Windows