Pennsylvania’s highest court has overturned comedian Bill Cosby’s sex assault conviction after finding that an agreement with a previous prosecutor prevented him from being charged, AP reported.

Cosby, 83, has served more than two years in prison.