script: fix traditional sort

Change-Id: I0b8ca88c13c494ff58759913c5861d6fb27fcb9e