Add missing str() cast.
Fix pep8 errors.