Fix for #766