Sort by refined state first