Undefined variables.

There were some undefined variables which were giving warnings.
I have changed them.