changed onDestroy() of ScriptActivity