fix log crash.