maybe fix segfault