fixed up a bunch of logging stuff