assorted bug and logging addtions