script: fix traditional sort

Change-Id: I15db0cdd1560d8758345613115332e6f699c1b98