fixed python 3 issue with map() iterator