opt: fix resize bug