Fixed crash when the tree is not really dirty