fixed bug in open / close element name match