Fixed minor errors in errors.c and helpers.c