fix for #1079