Fixe Piecewise() ccode bugs