Fix bug where 0 was not added to tree