Fixed bug in generated code

Fixed allocation line for the ByteBuffer