Small tweak (removed model.clear(). doesn't make any sense.)