Fix compilation and tests.