flash write fix