fix two bugs, numbering should reset full digits, >=operator to avoid -0