Fixed the way that the velocity is chosen in Model.