prevent a segfault loop