Fixed an occasional issue where log messages were too long.