fix segfault on reset to init state