script: fix traditional sort

Change-Id: I950b335187e7666383c8840a06e9315fd2c971a3