fixed a bug on visit_tab discharge labels