Fix memory leak on disable