Something is wrong with the ECM. If you create yourself an account at https://cloud.sagemath.com, just type `sage` and you can try it yourself:
```
sage: from sage.libs.libecm import ecmfactor
sage: N = 121
sage: factor(N)
11^2
sage: ecmfactor(N, 1)
(True, 121)
sage: ecmfactor(N, 100)
(True, 121)
sage: ecmfactor(N, 200)
(True, 121)
```
versus
```
sage: N = 122
sage: factor(N)
2 * 61
sage: ecmfactor(N, 1)
(True, 2)
sage: ecmfactor(N, 100)
(True, 2)
sage: ecmfactor(N, 200)
(True, 2)
```
So your implementation works just like in Sage. It's just that something is wrong in the way we use it...