fixed sorting for statuses