make it work with --tree (without -i)