§ 2504. Waiver of undertaking; removal and change of parties. (a) Waiver of undertaking. Unless the court orders otherwise, an undertaking may be waived by the written consent of all parties.(b) Removal and change of parties. The liability on an undertaking shall remain in effect in favor of the party for whose benefit it was given, notwithstanding a removal of the action or a change of parties.