Fix bug with updating models