Ensure variables do not leak on callbacks