Fix api for creating an attribute