fix for #783