script: fix traditional sort

Change-Id: I56f87d37acbd77b31c1814cf367f8504a68efc50