Fix broken unit tests bug