added fix for empty attribute detection