parsing error caused segfault in destroy()