Fixed new clamp code