added hack destructor for Medium's ctx's, couldn't get actual destructor to work