add test for get reordering
bug fix: memory leak