Fix boundary clipping for lam and mu