Merge pull request #1087 from narfbg/develop-issue-499

Fix issue #499