Fix sorting by date on lend page