Fixed wrong clearing of stringstream, call now also uses a stringstream for parsing.