Fixed unit test problems