really fix memory leak, coming from matplotlib