Fixing logging bugs.