fix for #246