Fix last curve cancelling behavior.
Fix enum_values_count sfinae detection.