Corrected problem with subentities with no NodeId which crashed the program