Fix reference in plotting