fix Buffer instance cloning

Fixes #40