Fix model saving.