Fix the bug that coverity found.