fix #1013
Merge pull request #1020 from chrox/fix_1013

fix #1013