Fix for #864