fix sorting with undefined in memory connector