Fix sorting to process featureId and date first