Fixed problem with inserting nand into main matrix.