Re-fixed sorting to handle partial runs alongside full runs