fix for #1064
fix for #1065