script: fix traditional sort

Change-Id: I1ad196e9b38281e2c9f17be3c6728ad1dd314bc9