Updating two tables at once