fix for #1217