Fixed access violation detailed in issue #8.
Merge pull request #9 from Abjorn/master

Fixed access violation detailed in issue #8.