fix bugs of ioc workunit lifetime scope