fix double logging issue