Fix the bug of empty buf (payload).