segfault issue (hopeully) fully resolved