script: fix traditional sort

Change-Id: Ied1e7ca6c048d36392b5e142ac0d559880992951