Add global setting & remove thread