Memory Leaks fixed