Failed unit tests fixed