Fixed logging issue