Cleanup, memory leak fix.