fixed a seg fault for adding two trees of degree 0