Bugfix: root_id can be NULL