fix for #380 #463