script: fix traditional sort

Change-Id: I9701ec3c69b79644338f3add26dee75f0553e12c