fix duplicate item deletion problem, as well as cleaning up all tab based on removed item