added missing initialisation of variables