Fix dictionary iteration compat' with python3 in pool