corrected a race affecting shared trees