Fix support for empty trees