Plug possible memory leak