fixed wrong way of asserting that a variable is defined
fixed wrong way of assigning a variable