Fix the double logging issues