Fixed unit tests (the one that is not passing is a bug that needs to be fixed)