I think I fixed the memory leak!