Fix SEGFAULT after dieing in tutorial