added terminators to variables to correct code