Do not load tree element.
Improvements for stubs
Fixed compilation
Another NPE fix try