fix Buffer reference