Method to kill all tasks