solved minimize window problem