Correct invalid variable access

`onAddTag` handler is not being invoked correctly because a variable is being referenced that was not defined in current scope.