fixing tests and compilation issues