fix for #1077