work with rare segfault