fix for #980