fix Error: cannot call methods on fancytree prior to initialization; attempted to call method 'destroy'