Fixed undefined variables.