fix for #1064
fix for #1065
Merge pull request #1066 from belforte/master

 	fix for #1064 and #1065