fix resize issue