fix for #1290