Fix logdb crash bug