fix resize bug after minimize window