fix python2 iteration, fix field accessing