Sorting exception fixed.