fix small bug when no specifying sorted path
add new test2
fix trivial bugs for test2