corrected toc bug when switching reference image