More debug code.
Plugged a memory leak.