Memory Leaks Fix