fix loging crash