fixed segfault in loc-unittest