Fix a memory leak with action activation