fix _is_root_ bug. minor changes.