fix for #1057