Fix sort compilation error