Fix some of the unit tests
Merge pull request #805 from adam111316/unittest_fixes

Fix some of the unit tests