Fixed handling of hostname, options being cut short.
Fixed parsing of string and hex.