fix error message for invalid curve name