back up to state before error