fixed the bug of test_getParent() that may cause a crash.