Fix to limit values to upper bounds on resize.