Where an instrument is evidence of different rights or different obligations, the court may, in a proper case, cancel it in part and allow it to stand for the residue.