Minor unit test bug fixes