Fix sort order bug.