Fixed the string reading function.
Implemented reading a protocol version.