added test for expand order
fix explore set memory leak