Added missing initialization of global variables.