Fix for #790