This change actually fixes the memory leak