fix bug: const reference in std::sort