a bunch of more fixes