Fixed bug for detecting tags with attrs.