memory leaks fixes...