Fixes from unit test PR