A start on fixing #994
Merge pull request #1027 from igorko/master

Fix heap corruption
Merge pull request #1013 from stefanbeller/master

A start on fixing #994