  We used 87 high resolution hydrodynamical cosmological simulations from the
NIHAO suite to investigate the relation between the maximum circular velocity
(Vmax) of a dark matter halo in a collisionless simulation and the velocity
width of the HI gas in the same halo in the hydrodynamical simulation. These
two quantities are normally used to compare theoretical and observational
velocity functions and have led to a possible discrepancy between observations
and predictions based on the Cold Dark Matter (CDM) model. We show that below
100 km/s, there is clear bias between HI based velocities and Vmax, that leads
to an underestimation of the actual circular velocity of the halo. When this
bias is taken into account the CDM model has no trouble in reproducing the
observed velocity function and no lack of low velocity galaxies is actually
present. Our simulations also reproduce the linewidth - stellar mass
(Tully-Fisher) relation and HI sizes, indicating that the HI gas in our
simulations is as extended as observed. The physical reason for the lower than
expected linewidths is that, in contrast to high mass galaxies, low mass
galaxies no longer have extended thin HI rotating disks, as is commonly
assumed.
