Fix dims usage in models.