fix ByteBuffer crash bug