fixed a bug in euclid.py