Tries to make the sorted join work (at least let us thing it does).