fixed sub-attribute detection