Fix controller and sorting.