Fixing more tests and logging