fixed bug caused by the read only ByteBuffer