Fixed by using `ByteBuf.toString()` instead of `readableBytes()`. I also improved `AbstractByteBuf.toString()` to tell if the buffer has been freed or not.