diff --git a/find/parser.c b/find/parser.c
index 75bbe69..3fffd23 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -911,7 +911,8 @@ static boolean
 parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
 {
   struct predicate *p = insert_num (argv, arg_ptr, entry);
-  p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
+  if (p)
+         p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
   return p;
 }

diff --git a/find/tree.c b/find/tree.c
index e0c44c8..101488c 100644
--- a/find/tree.c
+++ b/find/tree.c
@@ -1247,7 +1247,7 @@ build_expression_tree(int argc, char *argv[], int end_of_leading_options)
       oldi = i;
       if (!(*(parse_entry->parser_func)) (parse_entry, argv, &i))
        {
-         if (argv[i])
+         if (argv[oldi] && argv[oldi][0] != '-')
            {
              if ( (ARG_SPECIAL_PARSE == parse_entry->type) && (i == oldi) )
                {
@@ -1260,7 +1260,7 @@ build_expression_tree(int argc, char *argv[], int end_of_leading_options)
              else
                {
                  error (1, 0, _("invalid argument `%s' to `%s'"),
-                        argv[i], predicate_name);
+                        argv[oldi], predicate_name);
                }
            }
          else
