Fixed issue caused if the LastEdited column is not on the same table as the sort column