Fixed sorting on category