Fixed the leaks