Model change should be done in an  function

It appears that clicking on the checkbox doesn't update the model directly which results in a model not in sync with the checkbox status.