A segfault fix
A memory leak fix