Fix error with str function