Fixed tag deletion problem