fix for error when there is no nodetree in the file