Fixed stale element when re-using trees

Fixed stale element when re-using trees