Fixing some memory leak potentials.