Changed the way we allocate the buffers