Update model and set the cursor