Fix for #816