fix resize onload bug