Move var back to the top of the function declaration.