fixed available attribute and sorting