incorrect result when sort key was provided in different order from relation definition.