fixed a bug regarding existence tests in curve