Fixes egregious memory leak