Fixed bug introduced when we added an automatic device reset after flash memory write.