Fixed a bug that Alex spotted with tree root never being initialised.