Plug memory leaks on loading all modules