Fixed missing parameter validation for sort callback
Removed unnecessary method