WL-2351 fix sort and test