fake is not defined in this context.

After the reorganization of the function xhrSend there is a reference to a variable fake, this variable is not valid in the new context.