fix the issue of throwing exception when re-creating the context immedia...