added preservation of the background thread as the main thread so that we bypass waiting on the background thread which will never get pinged by the UI thread.