Fix a problem in the stub generator script
Fix an uninitialised variable