fix some (but not all) of the bugs introduced by removing instance accounting