Plug memory leak from 5be30c9