fix resize problem