Switched from self to cls after classmethod flag declaration.
Fixed bug in bad curve check.