Changed tagging logic