Readded code to retrieve the tag id.