fixed problem with python 3 map behavior