fix #1216 and #1215
Merge pull request #1220 from belforte/master

fix #1216 and #1215