race condition bug fixed
Merge branch 'master' into wj_dev