Fix for #827