Fix for #782