Fixing a desync bug between view and model.
Fixing issue #298.