fix for #1079
Merge pull request #1080 from belforte/master

fix for #1079