Fix memory memory leak