fix Select signature and SortBy result