fix for #336