Improve workflow_items sort