fixed null attributeKey issue