Update model on input change