updates before (possibly) flashing