TODO to ensure a script in scripted plugin will actually stop