Fix issue #37 Create buffer from array.

This commit fix some problems with create new buffer from array object