Fixed bugs in NAND driver.