Fixed difference in map() output between py2 and py3 by explicitly using list()