that part was wrong in some awkward cases; cython version