BUG: Fixed sorting