fixes an error when nodes are generated without an input file (fixes #91; fixes #90)

 * thanks to julezu for additions and reporting