Attempt to plug memory leak