Several unit tests fixed