Fixed issue with allocating too little memory, and the memory leak with
Read/ModNodes.