Fix issue #495
Merge pull request #525 from godarklight/issue-495

Fix issue #495.