Fixes log rotation bug.