Fixed to use read-only byte buffer.