fix multiple threads issue.