fix root handling