fix backend sorting