fixed original ordering and trailing comma sorts