MOTM-867: Fixed sorting as suggested in ticket