Merge pull request #306 from tfili/master

Fixed memory corruption
Had 2 definitions of the same variable which caused techniques to get cached indefinitely and would cause slightly different models to be generated each time.