Fix c extension and tests.