Fixed tag deletion issue