some Memory Leaks fixed