fixed a segfault in elliptic