undefined variables fixed

undefined variables fixed