Fix test unit errors