Fix to make updating the DB truly immutable.