clear queryHierarchy, fix moving hierarchy