Memory leaks fixed.