Fixed bug that affected unit tests