fix for #978