Fix for empty tree