fix string/str method references for py3