fix a bunch of stuff that got reverted at some point...