fixed segfault in log