Fix g.bat and gi.bat by corrrectly counting parameters.