Fix document root handling