Fix a logging bug