minor fixes by Qi
Merge branch 'next' into add_tsan_build_support