fix box resize issue