Fixed command 9 logic

Parsed an integer from the string from the result set.  also fixed the
string parsing for function 8.