Fixed access violation detailed in issue #8.