Fix sort order tests