Fix for #831