Rectified bugs for simplify and trigsimp