Fixed bug in trees, causing fails