Fixed compilation. Fixed tests.