Fixed bugs concerning Windows.