Updating id based on what it is in the db