fix for #1335