Fix for #829