fixed a bug in the degree 2 curve