next() fails on py >= 3.0