fixed double logging issue