Maybe this will prevent the segfault