fixing a logging issue