Change ArrayBuffer to Buffer