fix for #1566