fixed issue where tag name gets queried as tag id