fix for #337