Fixing string leaks