minimize window bugfix