fix for #770