Completed sort by duration, small fix