Fix for memory leak.
Merge branch 'dev' of github.com:tchaudhry/Miraath into dev