Fixed bug where I forgot to allocate memory for nodes.