Added a filter that keeps the sort order of the entities