Fix for #818