The sex assault conviction of Bill Cosby, 83, has been overturned by Pennsylvania’s highest court.

The conviction was overturned after the court found an agreement with a previous prosecutor that prevented him from being charged in the case.

Cosby, who was once known as “America’s Dad,” was charged in 2015 from an alleged assault in 2004. He’s been in jail for two years, serving a 3-10 year sentence at a state prison near Philadelphia.

Cosby was accused of drugging and sexually assaulting Andrea Constand at his suburban estate in 2004.

He was charged just days before the 12-year statute of limitations expired in 2015.