Sort statuses so they appear in the right order