fix map usage in python3