Issue #74

Fix serious flash write bug.