remove unnecessary NULLs
fix error
fix typo && fix race condition