fix log crash