Fixed sorting by abstract