Fixed template precompilation.
Fixed the tests.