Fixed undefined variable assignments.