hopefully eliminated the segfault issue