Crash fix and debug demo debug build fix

Here's the fixed destroyTechniques loop, and a little change to the demo code so the debug builds run.