some wrong references to the common variables

fixed wrong references to variables