fix : if write client failed restore the message