Fixed some typos and change background checking code