fix for #1496