Merge pull request #1024 from narfbg/develop-issue-1021

Fix issue #1021