fix some leaks
Merge pull request #1540 from ethomson/leaks

fix some leaks