fix for #339