Fix some logging issues.