Fix crash when reading the empty tree