fixed minor bug with deleting elements then changing tabs but items not
deleted on the switched tab