fixed logging issue