Fix issue with target tree not updating correctly