Fix unit tests errors