fix double logging