avoid dangling trees