fixed a buggy logic that added curves to the curve tree in the collect curves function