fix sort keys in pipeline