fix for #1051