Fixing reference to undefined variable.