Fix for #1079