Fixed a few failures in unit-tests