fixed off by one bug when generate constants names
fixed off by one bug when generate Constants names