Improve the logic of this text.
He gets his friends involved, who help rescue her. Not before Doiby serves time as a court jester.
He gets his friends involved, who help rescue her but not before Doiby serves time as a court jester.