fixed nodeIsRoot()