Made the matplotlib bits come up at the very end