fix unit errors