bugfix plottab

Fixed a bug that prevented tabs from disappering when removed