fixed clamping state bug