fix incorrect sort order in build