fixing tests and compilation problems