Fix memory leak

(and reduce memory usage slightly when creating multiple reports)