fix writing nodeDefinitions