Fix generators of strings not being convertible to int, for python 3