Fix the background problem in long thread.