Fix for random log writes.