fixed another bug in element name checking