NAND finally working. Two bugs fixed: