a bunch of minor fixes