fixed py3k compatibility issue