fixed bug in elliptic