Reset the variable when it is no longer used to avoid unexpected things from happening.