Fixes sort by date