Fixing and adding new unit test