fix missing function and cancel some useless space