Fix but where window resized incorrectly on windows.