Fix clamping of auto handle in some rare case.