fix for unlimited number of nodes