fix for #771