fix sorted fetch

fixes buggy commit af2e4c7