Memory Leak fix