fix for #334