Fix memory leak

Thanks Jeff!