script: fix traditional sort

Change-Id: I6ad77dbd5215a281a60ed430b31933caf9cc84af