NAND related fixes