Fix the problem of buffer