Fixing Memory Leaks'