Unit Test Fixes

This PR has some fixes to the unit tests.