Adding memset to fix segfault