changed resetting of istringstream