Fixed bug when maximizing a window on Windows (was introduced recently)