in reply to sort != sort
The problem is elsewhere so show us the full code (or at least some more).
Perhaps it is the missing close-quote on the second 'num'?