make sure the operation'll be done in main thread.