Issue #179: try fixing memory leak