fixed when tree is empty