Fix restoration of minimized windows