Got rid of segfault upon close