getting rid of a segfault in init