better fix for root location path resolve