update tests, fix some update bugs