fix NPE due to possibleMinimalSorts