Sorting now displays error message if unsuccessful