fix some logging issues