correction of mistakes in dealing with strings

correction of mistakes in dealing with strings