Fixed sorting by values.