fix memory leak on getRoot.
names in module.
exception safe.