Fix bug in log processing.