Memory leak fix.