Move numerical sort earlier in the pipeline