Fixes some more unit test bugs