fix potential log record corruption