Fixing some logging issues