Adds update that makes clamp function work more consistently.