fixed python 2 to 3 compatibility with __str__