Fix some logging issues