fix empty attribute and api for chosen component