Fix type of the sort_by option