fix resize corner case