fix for #386