Fix the problem that a function was called twice which should be once.

Signed-off-by: khxkhx321 <khxkhx321@163.com>