Bugfix for root_with_prefix