fix #987
Merge pull request #994 from chrox/fix_987

fix #987