Apply dangerous bugfix for nand writing. Need rewriten