Updated the Buffer constructor