clear buffer before receive.