Fixed sorting and the displaying of empty data