script: fix traditional sort

Change-Id: I7ed8094dbeee193d0384443f601d9e03d9427227