fixed the log wrapping bug.