Trying to deal with closure problem of automatic event delegation.