Fixed unit test errors