Fix bug with deleted tags.