When trying to sort my data I get an error