Fix memory leak that's been there for 5 years but nobody noticed until now :) Fixes #3.