Fixed sorting by time