Fixed the background thread