fix handling of trivial curves