Fix for #876