[#8] Fixed leaks