solve the hiddde crisis of multi-thread caused by static variable in some functions
Merge pull request #36 from niuox/master