fixed initialization of variables