fixed empty element template match