fix for #1031